package Bio::Rambam::Proteomics::Protein;

use Moose;
use namespace::autoclean;
use Data::Dumper;

has 'accession'	=>	(is=>'rw',isa=>'Str');
has 'name'		=>	(is=>'rw',isa=>'Str');
has 'origin'	=>	(is=>'rw',isa=>'Str');

has 'decoy'			=>	(is=>'rw',	isa=>'Bool',default=>0);
has 'psms_ref'		=>	(is =>'rw', isa=>'HashRef[Str]',default=>sub{{}},);
has 'num_psms_ref' 	=>	(is=>'rw',	isa=>'Int',default=>0);
has 'quant_info'	=>	(is =>'rw', isa=>'HashRef[Bio::Rambam::Proteomics::Quant::PsmQuantInfo]',default=>sub{{}},);#parche que te cagas


sub set_psms_ref{
	my $self=shift;
	my $protein = shift;
	${$self->psms_ref}{$protein}=1;
	my $num_psms=$self->num_psms_ref();
	$num_psms++;
	$self->num_psms_ref($num_psms);
}

sub set_quant_info{
	my $self=shift;
	my $id=shift;
	my $quant_info =shift;
	unless (defined $quant_info){
		#print "sin quant info $id\n";
		return;
	}
	unless (defined $id){
		print "sin  $id\n";
		return;
	}
	${$self->quant_info}{$id}=$quant_info;
}



__PACKAGE__->meta->make_immutable;
